import request from '@/axios/index'
// 出来请求的方法
import {
  u
} from './url'
// 登录
export const loginApi = {
  login(data) {
    return request({
      url: u.login,
      method: 'post',
      data
    })
  },
  logout(data) {
    return request({
      url: u.logout,
      method: 'post',
      data
    })
  }
}

// 系统重启
export const systemSettingApi = {
  restart() {
    return request.post(u.systemSettingRestart)
  }
}
// 个人信息
export const userInfoApi = {
  get() {
    return request.get(u.userInfoGet)
  },
  save(data) {
    return request.post(u.userInfoSave, data)
  }
}
// 虚拟终端配置
export const virtualTerminalApi = {
  list(pageIndex,pageSize,searchText) {
    return request.post(`${u.virtualTerminalList}?pageIndex=${pageIndex}&pageSize=${pageSize}&searchText=${searchText}`)
  },
  add(data) {
    return request.post(u.virtualTerminalAdd, data)
  },
  addAll(data) {
    return request.post(u.virtualTerminalAddAll, data)
  },

}